import {Model, Table, Column, DataType} from 'sequelize-typescript'

/*
* 用户基础信息表
* */
@Table
export default class User extends Model<User> {
  @Column({
    comment: '自增ID',
    autoIncrement: true,
    primaryKey: true,
  })
  id: number

  @Column({
    comment: '姓名',
  })
  name: string

  @Column({
    comment: '年龄',
    defaultValue: 0,
  })
  age: number

  @Column({
    type: DataType.TINYINT,
    comment: '性别',
  })

  gender: number
  @Column({
    comment: '用户名',
  })
  username: string

  @Column({
    comment: '邮箱',
  })
  email: string

  @Column({
    type:DataType.STRING(11),
    comment: '手机号',
  })
  phone: string

  @Column({
    comment: '微信号',
  })
  weixin: string

  @Column({
    comment: '微博',
  })
  weibo: string

}
